Sometimes, multiple parties, each owning some data, want to collaborate with each other while preserving the privacy of their own data in the meantime. The data may be horizontally partitioned across the multiple parties. That means that each party owns all attributes (or columns) for a set of data entries (or rows). As an example, consider a healthcare scenario where multiple hospitals are willing to collaborate. Each hospital may have complete data about its patients. In order to run analytics on multi-party data in a privacy preserving manner, various protocols are used as building blocks in data mining. Conventional solutions either target a particular analytical task and thus cannot be applied to generic analytical tasks, or assume two parties when applicable to generic analytical tasks with increased computational complexity when the number of parties is more than two. Hence, it is difficult to scale these conventional solutions to big data analytics and generic analytical tasks, especially when more than two parties participate in the communications.